package com.isunland.managesystem.ui;

import android.app.Activity;
import android.content.Intent;
import android.support.v4.app.Fragment;
import com.isunland.managesystem.R;

/**
 * 对象功能:
 * 开发公司: 北京信普达系统工程有限公司
 * 开发人员: wangyanan
 * 创建时间: 2017/4/7 10:18
 */
public class OperationSubLogListActivity extends SingleFragmentActivity {
  @Override protected Fragment createFragment() {
    String id = getIntent().getStringExtra(LocaleWorkQueryCountDiaryListFragment.EXTRA_ID);
    String status = getIntent().getStringExtra(LocaleWorkQueryCountDiaryListFragment.EXTRA_STATUS);
    String title = getString(R.string.cropCheck);
    return LocaleWorkQueryCountDiaryListFragment.newInstance(id, status, title);
  }

  public static void newInstance(android.support.v4.app.Fragment fragment, Activity context,
      int requestCode, String id, String dataStatus) {
    if (fragment == null || context == null) return;
    Intent i = new Intent(context, OperationSubLogListActivity.class);
    i.putExtra(LocaleWorkQueryCountDiaryListFragment.EXTRA_ID, id);
    i.putExtra(LocaleWorkQueryCountDiaryListFragment.EXTRA_STATUS, dataStatus);
    fragment.startActivityForResult(i, requestCode);
  }
}
